<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <div id="app">
    ==== {{count}} ====={{obj.num}}
    <hr>
    <button @click="count+=10, obj.num+=2">+10</button>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <script>
    const an = new Vue({
      el: '#app',
      data: {
        count: 10,
        obj: {
          num: 1
        }
      },
      methods: {

      },
      watch: {
        count(newVal, oldVal) {
          console.log(newVal, oldVal, 111);
        },
        'obj.num'() {
          console.log(2222);
        },
        // obj:{
        //  handerl(newVal){
        //   console.log(newVal.num,1212)
        //  },
        //  deep:true,
        //  immediate:true
        // }
      }
    })
  </script>
</body>

</html>